<!doctype html>
<html>
<head>
    <meta charset=utf-8>
    <title></title>
    <meta name="robots" content="noindex,nofollow">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="<?=Web_Path?>packs/layui/css/layui.css">
    <link rel="stylesheet" href="<?=Web_Path?>packs/admin/css/font.css">
    <link rel="stylesheet" href="<?=Web_Path?>packs/admin/css/style.css">
    <?=$opt_gc?>
    <script src="<?=Web_Path?>packs/js/jquery.min.js"></script>
    <script src="<?=Web_Path?>packs/admin/js/setcolor.js"></script>
    <script src="<?=Web_Path?>packs/layui/layui.js"></script>
    <script src="<?=Web_Path?>packs/admin/js/cscms.js"></script>
</head>
<body id="index_setting">
    <span class="layui-breadcrumb" >
        <a ><cite><i class="fa fa-map-marker"></i>位置</cite></a>
        <a href="<?=site_url('singer/admin/singer')?>">歌手管理</a>
        <a href=""><?=$title2?></a>
    </span>
    <div class="layui-tab layui-tab-brief" >
        <ul class="layui-tab-title">
            <li><a class="tablink" href="<?=site_url('singer/admin/singer')?>">歌手列表</a></li>
            <li ><a class="tablink" href="<?=site_url('singer/admin/singer')?>?yid=2">待审核歌手</a></li>
            <li><a class="tablink" href="<?=site_url('singer/admin/singer')?>?yid=3">回收站歌手</a></li>
            <li class="layui-this"><a class="tablink" href="<?=site_url('singer/admin/singer/edit')?>?id=<?=$id?>"><?=$title2?></a></li>
            <li><a class="tablink" href="<?=site_url('singer/admin/opt/downpic')?>">一键同步歌手图片到本地</a></li>
        </ul>
        <div class="layui-tab-content" style="min-height: 360px;">
            <form class="layui-form layui-form-pane" action="<?=site_url('singer/admin/singer/save')?>" method="post">
            <div class="layui-tab">
                <ul class="layui-tab-title">
                    <li class="layui-this">基本参数</li>
                    <li>其他参数</li>
                    <li>介绍/SEO</li>
                    <li>自定义字段</li>
                </ul>
                <div class="layui-tab-content">
                    <div class="layui-tab-item layui-show">
                        <div class="layui-form-item">
                            <label class="layui-form-label">歌手参数</label>
                            <div class="layui-input-inline layui-input-inlinew marg10">
                                <select name="cid">
                                    <option value="0">选择分类</option>
                                    <?php
                                        $query = $this->db->query("SELECT id,name FROM ".CS_SqlPrefix."singer_list where fid=0 order by xid asc"); 
                                        foreach ($query->result() as $row) {
                                            $clas=($row->id==$cid)?' selected="selected"':'';
                                            echo '<option value="'.$row->id.'"'.$clas.'>'.$row->name.'</option>';
                                            $query2 = $this->db->query("SELECT id,name FROM ".CS_SqlPrefix."singer_list where fid=".$row->id." order by xid asc");
                                            foreach ($query2->result() as $row2) {
                                                $clas2=($row2->id==$cid)?' selected="selected"':'';
                                                echo '<option value="'.$row2->id.'"'.$clas2.'>'.$row2->name.'</option>';
                                            }
                                        }
                                    ?>

                                </select>
                            </div>
                            <div class="layui-input-inline layui-input-inlinew" >
                                <select name="reco">
                                    <option value="0">歌手推荐</option>
                                    <option value="1" <?php if($reco=='1') echo ' selected';?>>★☆☆☆☆</option>
                                    <option value="2" <?php if($reco=='2') echo ' selected';?>>★★☆☆☆</option>
                                    <option value="3" <?php if($reco=='3') echo ' selected';?>>★★★☆☆</option>
                                    <option value="4" <?php if($reco=='4') echo ' selected';?>>★★★★☆</option>
                                    <option value="5" <?php if($reco=='5') echo ' selected';?>>★★★★★</option>
                                </select>
                            </div>
                            <div class="layui-input-inline layui-input-inlinew" >
                                <input class="layui-input" name="color" id="color" type="text" value="<?=$color?>"/>
                                <img src="<?=Web_Path?>packs/admin/images/rect.gif" width="18" height="17" border=0 style="position:absolute;right: 5px;top:9px;cursor:pointer;background-Color:<?=$color?>;" title="字体颜色" onClick="initcolor('color','imgs_color');" id="imgs_color" align="absmiddle" vspace="1">
                            </div>
                            <div class="layui-form-mid layui-word-aux">名称颜色</div>
                            <div class="layui-input-inline">
                                <input type="checkbox" name="addtime" lay-skin="primary" value="ok" title="更新时间" checked>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">歌手标题</label>
                            <div class="layui-input-inline layui-input-inlinew3">
                                <input type="text" name="name" placeholder="请输入歌手名称" value="<?=$name?>" class="layui-input">
                            </div>
                            <label class="layui-form-label">英文别名</label>
                            <div class="layui-input-inline layui-input-inlinew3">
                                <input type="text" name="bname" placeholder="" value="<?=$bname?>" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">歌手图片</label>
                            <div class="layui-input-inline" >
                                <input id="pic" type="text" name="pic" value="<?=$pic?>" class="layui-input">
                            </div>
                            <?php
                                if(preg_match("/(iPhone|iPad|iPod|Android)/i", strtoupper($_SERVER['HTTP_USER_AGENT']))){
                                    echo '<button type="button" class="layui-btn layui-btn-primary" id="pics"><i class="layui-icon colorb">&#xe608;</i>上传图片</button>';
                                }else{
                                    echo '<div class="layui-input-inline" style="width: auto;"><a href="javascript:cscms.get_open(\''.site_url('upload/up').'?dir=singer\',\'上传图片\',\'500px\',\'360px\')" class="layui-btn layui-btn-primary"><i class="layui-icon" style="color:green">&#xe608;</i>上传图片</a></div>';
                                }
                            ?>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">会员名称</label>
                            <div class="layui-input-inline">
                                <input type="text" name="user" placeholder="会员名称" value="<?=getzd('user','name',$uid)?>" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">TAGS标签</label>
                            <div class="layui-input-inline">
                                <input type="text" name="tags" placeholder="多个逗号隔开" value="<?=$tags?>" class="layui-input">
                            </div>
                        </div>
                    </div>
                    <div class="layui-tab-item">
                        <div class="layui-form-item">
                            <label class="layui-form-label">基本资料</label>
                            <label class="layui-form-label label2 marg10">别名</label>
                            <div class="layui-input-inline layui-input-inlinew">
                                <input type="text" name="nichen" value="<?=$nichen?>" class="layui-input">
                            </div>
                            <label class="layui-form-label label2 marg10">身高</label>
                            <div class="layui-input-inline layui-input-inlinew">
                                <input type="text" name="height" value="<?=$height?>" class="layui-input">
                            </div>
                            <label class="layui-form-label label2 marg10">体重</label>
                            <div class="layui-input-inline layui-input-inlinew">
                                <input type="text" name="weight" value="<?=$weight?>" class="layui-input">
                            </div>
                            <label class="layui-form-label label2 marg10">性别</label>
                            <div class="layui-input-inline layui-input-inlinew">
                                <input type="text" name="sex" value="<?=$sex?>" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">其他资料</label>
                            <label class="layui-form-label label2 marg10">生日</label>
                            <div class="layui-input-inline layui-input-inlinew">
                                <input type="text" name="sr" value="<?=$sr?>" class="layui-input">
                            </div>
                            <label class="layui-form-label label2 marg10">国籍</label>
                            <div class="layui-input-inline layui-input-inlinew">
                                <input type="text" name="nat" value="<?=$nat?>" class="layui-input">
                            </div>
                            <label class="layui-form-label label2 marg10">星座</label>
                            <div class="layui-input-inline layui-input-inlinew">
                                <input type="text" name="xingzuo" value="<?=$xingzuo?>" class="layui-input">
                            </div>
                            <label class="layui-form-label label2 marg10">语言</label>
                            <div class="layui-input-inline layui-input-inlinew">
                                <input type="text" name="yuyan" value="<?=$yuyan?>" class="layui-input">
                            </div>
                            <label class="layui-form-label label2 marg10">家乡</label>
                            <div class="layui-input-inline layui-input-inlinew">
                                <input type="text" name="city" value="<?=$city?>" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">访问人气</label>
                            <label class="layui-form-label label2 marg10">总</label>
                            <div class="layui-input-inline layui-input-inlinehot">
                                <input type="text" name="hits" value="<?=$hits?>" class="layui-input">
                            </div>
                            <label class="layui-form-label label2 marg10">月</label>
                            <div class="layui-input-inline layui-input-inlinehot">
                                <input type="text" name="yhits" value="<?=$yhits?>" class="layui-input">
                            </div>
                            <label class="layui-form-label label2 marg10">周</label>
                            <div class="layui-input-inline layui-input-inlinehot">
                                <input type="text" name="zhits" value="<?=$zhits?>" class="layui-input">
                            </div>
                            <label class="layui-form-label label2 marg10">日</label>
                            <div class="layui-input-inline layui-input-inlinehot">
                                <input type="text" name="rhits" value="<?=$rhits?>" class="layui-input">
                            </div>
                        </div>
                    </div>
                    <div class="layui-tab-item">
                        <div class="layui-form-item layui-form-text" >
                            <label class="layui-form-label">歌手内容</label>
                            <div class="layui-input-block">
                                <textarea id="text" lay-verify="content" name="content" placeholder="请输入歌词" style="display: none;" class="layui-textarea"><?=$content?></textarea>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">SEO设置</label>
                            <div class="layui-input-inline">
                                <a class="layui-btn layui-btn-small" style="margin: 4px 10px;" href="javascript:$('#seo').toggle();">点击展开/合并SEO设置</a>
                            </div>
                        </div>
                        <div id="seo" style="display: none;">
                        <div class="layui-form-item layui-form-text">
                            <label class="layui-form-label">SEO标题</label>
                            <div class="layui-input-block">
                                <textarea name="title" style="height: 100px" class="layui-textarea"><?=$title?></textarea>
                            </div>
                        </div>
                        <div class="layui-form-item layui-form-text">
                            <label class="layui-form-label">SEO关键字</label>
                            <div class="layui-input-block">
                                <textarea name="keywords" style="height: 100px" class="layui-textarea"><?=$keywords?></textarea>
                            </div>
                        </div>
                        <div class="layui-form-item layui-form-text">
                            <label class="layui-form-label">SEO介绍</label>
                            <div class="layui-input-block">
                                <textarea name="description" style="height: 100px" class="layui-textarea"><?=$description?></textarea>
                            </div>
                        </div></div>
                    </div>
                    <div class="layui-tab-item"><?=$opt_field?></div>
                </div>
            </div>
                <input type="hidden" name="id" value="<?=$id?>">
                <input type="hidden" name="yid" value="<?=$yid?>">
                <div class="layui-form-item">
                    <div class="layui-input-block layui-input-common noborder">
                        <button class="layui-btn" lay-submit lay-filter="setting">提交</button>
                        <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
    <script type="text/javascript">
        cscms.init(5);
        cscms.mode('cscms.getUpload(\'<?=Web_Path.SELF?>/upload/up_save_json?dir=singer\')');
    </script>
</body>
</html>